var cc__decorate = __decorate;
Object.defineProperty(exports, "__esModule", {
  value: true
});
var $2ByteConstant = require("ByteConstant");
var $2WeChatConstant = require("WeChatConstant");
var $2ADManager = require("ADManager");
var $2AudioManager = require("AudioManager");
var $2DataManager = require("DataManager");
var $2UIManager = require("UIManager");
var $2KDefine = require("KDefine");
var $2MyUtils = require("MyUtils");
var $2SharePanelUI = require("SharePanelUI");
var cc__decorator = cc._decorator;
var ccp_ccclass = cc__decorator.ccclass;
var ccp_property = cc__decorator.property;
var def_FailBowlingUI = /* */function (_cc$Component19) {
  babel_inherits(f, _cc$Component19);
  var _super21 = babel_createSuper(f);
  function f() {
    babel_classCallCheck(this, f);
    return _super21.apply(this, arguments);
  }
  babel_createClass(f, [{
    key: "onLoad",
    value: function onLoad() {
      $2DataManager.default.instance.clearTempData();
      $2AudioManager.default.instance.playMusic($2KDefine.AudioName.FailBgm);
      this.initPlatform();
    }
  }, {
    key: "initPlatform",
    value: function initPlatform() {
      switch ($2ADManager.default.instance.sdkType) {
        case $2ADManager.SDK_TYPE.Byte:
          $2MyUtils.MyUtils.probability($2ByteConstant.default.resultInster) && $2ADManager.default.instance.showInsert();
          $2ADManager.default.instance.recorderStop();
          $2DataManager.default.instance.level > 3 && $2DataManager.default.instance.level % 2 == 0 && $2UIManager.default.instance.openUI("SharePanelUI").getComponent($2SharePanelUI.default).init(1);
          break;
        case $2ADManager.SDK_TYPE.WeChat:
          this.scheduleOnce(function () {
            $2UIManager.default.instance.showUI("MoreGameUI", 999);
          }, $2WeChatConstant.default.juZhenDelay);
          $2ADManager.default.instance.showNative(1);
          $2ADManager.default.instance.showNative(2);
          $2ADManager.default.instance.showNative(3);
      }
    }
  }, {
    key: "onClickRestartBtn",
    value: function onClickRestartBtn() {
      $2UIManager.default.instance.closeUI("BowlingUI");
      $2UIManager.default.instance.closeUI("FailBowlingUI");
      $2UIManager.default.instance.showUI("BowlingUI");
    }
  }, {
    key: "onClickBackHomeBtn",
    value: function onClickBackHomeBtn() {
      $2UIManager.default.instance.closeUI("BowlingUI");
      $2UIManager.default.instance.closeUI("FailBowlingUI");
      $2UIManager.default.instance.showUI("MenuUI");
    }
  }, {
    key: "onClickUpgradeBtn",
    value: function onClickUpgradeBtn() {
      $2UIManager.default.instance.closeUI("FailUI");
      $2UIManager.default.instance.openUI("MenuUI").opacity = 0;
      $2UIManager.default.instance.openUI("UpgradeUI");
    }
  }, {
    key: "onDestroy",
    value: function onDestroy() {
      $2ADManager.default.instance.hideNative(1);
      $2ADManager.default.instance.hideNative(2);
      $2ADManager.default.instance.hideNative(3);
    }
  }]);
  return f;
}(cc.Component);
def_FailBowlingUI = cc__decorate([ccp_ccclass], def_FailBowlingUI);
exports.default = def_FailBowlingUI;